{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}	

<div style="float:left; width: 10%;">
	{include file=maintenance/links.tpl}
</div>

{$html->toolbar->title('Polls')}
{$html->toolbar->custom('reset','back','','Reset')}
{$html->toolbar->deleteList()}

<div style="float:right; width: 90%;">
	<form name="adminForm" method="POST">
		<input type="hidden" name="checked" value="0"/>
		<input type="hidden" name="agora_task" value="maintenance"/>
		<input type="hidden" name="task" value=""/>
		<input type="hidden" name="page" value="polls"/>
		<input type="hidden" name="option" value="com_agora"/>
		<input type="hidden" name="boxchecked" value="0"/>

		<table class="adminlist">
			<thead>
				<th width="20">
					<input type="checkbox" name="toggle" value="" onclick="checkAll({$polls|@count});" />
				</th>
				<th>##Poll##</th>
				<th>##Poll Type##</th>
				<th>##Created##</th>
			</thead>
			<tbody>
				{foreach from=$polls item=poll key=num}
				<tr>
					<td>{$html->jhtml('grid.id', $num, $poll.id)}</td>
					<td>
						{* <a target="_blank" href="{url task=viewtopic id=$poll.id}"> *}
						{$poll.subject}&bull;{$poll.question}
						{* </a> *}
					</td>
					<td>
						{if $poll.ptype == 1}##Regular##
						{elseif $poll.ptype == 2}##Multiselect##
						{elseif $poll.ptype == 3}##Yesno##
						{/if}
					</td>
					<td>
						{$poll.created|agora_date}
						{if $poll.edited > 0}
						 &nbsp;(##Edited## : {$poll.edited|agora_date} )
						{/if}
					</td>
				</tr>
			{foreachelse}
			<tr><td align="center" colspan="5">##No polls##</td></tr>
		{/foreach}
			</tbody>
		</table>
	</form>
</div>